package stu.day33_day38.day37;

public class hw1 {



    public int singleNumber(int[] nums) {
        int n = nums.length;
        int num = 0;
        for (int j =0; j < 32; j++) {
            int index = 0;
            for (int i = 0; i < n; i++) {
                if((nums[i]>>j&1)==1) {
                    index +=1;
                }
            }
            if((index%3)==1) {
                num += 1<<j;
            }
        }




        return num;



    }

    public static void main(String[] args) {
        System.out.println(18%3);
        System.out.println(7<<2);
    }






}
